home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1886 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.7 KB

  1. Path: hilbert.dnai.com!usenet
  2. From: Victor Bazarov <vbazarov@imsisoft.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: C++  Vs. C  & Efficiency
  5. Date: Sat, 13 Jan 1996 11:41:41 -0800
  6. Organization: IMSI
  7. Message-ID: <30F80AF5.6E11@imsisoft.com>
  8. References: <4d59ub$pfg@berlin.infomatch.com>
  9. NNTP-Posting-Host: vbazarov.imsisoft.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b4a (Win16; I)
  14.  
  15. Edwin Tam wrote:
  16. > Hello,
  17. > I have recently become proficient in C++ programming and was wondering about
  18. > the advantages of C++ vs C. One thing that has always sorta bugged me though
  19.  
  20. If you are proficient, why in hell are you wondering about the advantages?
  21. Are you really proficient? Are you really wondering?
  22.  
  23. > the question of the extra overhead required by C++ ( compiler wise ).
  24.  
  25. What's "compiler wise"? How can "extra overhead" be "required"?
  26.  
  27. > It seems as if every C++ programmer wants to 'object'ize every thing without
  28. > considering the overhead incurred by objects.
  29.  
  30. What seems?
  31.  
  32. > Has anyone got any opinions or idea of the overhead imposed by C++??
  33.  
  34. I heard of the 15-20% decrease of the program speed because of extra calls
  35. to object ctors and dtors. But I always wonder: compared to what? C has no classes.
  36. If you do not use classes, if you take C program and compile it with C++
  37. compiler, there is no change (presuming it can be compiled). So what is all
  38. the fuss about?
  39.  
  40. > A simple ponder : For every object instance, every variable of that class is
  41. > duplicated... even if its not required.
  42.  
  43. If it's not required, make it static data member, and it'll not be duplicated,
  44. I say.
  45.  
  46. > Edwin
  47.  
  48. What a bandwidth wasted!
  49.  
  50. Victor.
  51.  
  52. -- 
  53. Signature.
  54.